package dameng.demo.domain;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;


@Data
@Entity
@Table(name = "DEMO_ENTITY",
        uniqueConstraints = {@UniqueConstraint(columnNames = {"nickname"})})
public class DemoEntity implements Serializable {

    private static final long serialVersionUID = 8811043756872024674L;

    @Id
    private String id;

    @Column(length = 100, nullable = false)
    private String username;

    @Column(length = 150)
    private String nickname;


    @Column(length = 150)
    private String nickname1;
    @Column(length = 150)
    private String nickname2;
    @Column
    private Integer age = 0;

    @Column(precision = 10, scale = 2)
    private BigDecimal salary;

    @Lob
    private String remark;
}
